package com.njwb.controller;

import com.njwb.json.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.loadbalancer.annotation.LoadBalancerClientConfiguration;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

@RestController
public class UserController {


    private static String URL = "http://nacos-provider-cluster";
    @Autowired
    private RestTemplate restTemplate;
    @GetMapping("user")
    public ResponseResult findById(){
        return  restTemplate.getForObject(URL + "/user",ResponseResult.class);
    }
}
